from rest_framework import serializers
from django.contrib.auth.models import Group,Permission

#1,操作权限序列化器
class PermissionGroupSerializer(serializers.ModelSerializer):
    class Meta:
        model = Group
        fields = "__all__"

#2,获取所有权限,序列化器
class PermissionGroupSimpleView(serializers.ModelSerializer):
    class Meta:
        model = Permission
        fields = ("id","name")